\hypertarget{class_control_water}{
\section{ControlWater Class Reference}
\label{class_control_water}\index{ControlWater@{ControlWater}}
}


{\ttfamily \#include $<$ControlWater.h$>$}

\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{class_control_water_a982e0977cb50629a962a4c12bf7ca21a}{ControlWater} (\hyperlink{class_data_storage}{DataStorage} $\ast$pData, \hyperlink{class_water_u_i}{WaterUI} $\ast$pUI)
\item 
\hyperlink{class_control_water_a873503afdb91122677c4a348879d1482}{$\sim$ControlWater} ()
\item 
void \hyperlink{class_control_water_ad633f5a3cda34dd7313bb131829fdbc8}{start} ()
\item 
void \hyperlink{class_control_water_afabb40821e1d527380559479b59b72bf}{manageData} ()
\item 
void \hyperlink{class_control_water_a5479085fd696bdec9cc4fb144acb72a2}{importData} ()
\item 
void \hyperlink{class_control_water_a91f31497a1c48ca790bed1c6071f83bc}{exportData} ()
\item 
void \hyperlink{class_control_water_ad7c1a7ec2197305bd325b0ffd0119565}{wipeData} ()
\item 
void \hyperlink{class_control_water_af168010e1d95d349169744ea4a8e021e}{manageNetwork} ()
\item 
void \hyperlink{class_control_water_ac1951612172accb707328ce3c7341c7e}{findSolutions} ()
\item 
void \hyperlink{class_control_water_a0f3df5a777946fd6271f8adb964a2b10}{showRoadNetwork} ()
\item 
void \hyperlink{class_control_water_a8c3e07d4a59d9abff9eb3f1570df9603}{showNetwork} ()
\item 
void \hyperlink{class_control_water_a0cb3fda8adde7e6019351391be3c1a00}{maxFlowDinic2nodes} ()
\item 
void \hyperlink{class_control_water_ade1fe89adc69c3e830d00b27be65c9bb}{maxFlowFord2nodes} ()
\item 
void \hyperlink{class_control_water_a4896e05db82838eab7a69a687d92fec7}{newInfrastructure} ()
\item 
void \hyperlink{class_control_water_ab2298a4d859a29914fda7147c3af4a69}{newJunction} ()
\item 
void \hyperlink{class_control_water_acb22dae8cb7c383a00bc576ede1db9bc}{newReservoir} ()
\item 
void \hyperlink{class_control_water_a4ca574dd210b1c53775cc279662f6b8d}{removeInfrastructure} ()
\item 
void \hyperlink{class_control_water_a4d53631b73a61b25d241ebaf1185f0b0}{removeJunction} ()
\item 
void \hyperlink{class_control_water_a3167861d71755558e09ba27915576370}{removeReservoir} ()
\end{DoxyCompactItemize}


\subsection{Detailed Description}
Implements the Control part of the MVC implementation. 

\subsection{Constructor \& Destructor Documentation}
\hypertarget{class_control_water_a982e0977cb50629a962a4c12bf7ca21a}{
\index{ControlWater@{ControlWater}!ControlWater@{ControlWater}}
\index{ControlWater@{ControlWater}!ControlWater@{ControlWater}}
\subsubsection[{ControlWater}]{\setlength{\rightskip}{0pt plus 5cm}ControlWater::ControlWater (
\begin{DoxyParamCaption}
\item[{{\bf DataStorage} $\ast$}]{pData, }
\item[{{\bf WaterUI} $\ast$}]{pUI}
\end{DoxyParamCaption}
)}}
\label{class_control_water_a982e0977cb50629a962a4c12bf7ca21a}
The constructor, receives the pointer to data and to the interface. \hypertarget{class_control_water_a873503afdb91122677c4a348879d1482}{
\index{ControlWater@{ControlWater}!$\sim$ControlWater@{$\sim$ControlWater}}
\index{$\sim$ControlWater@{$\sim$ControlWater}!ControlWater@{ControlWater}}
\subsubsection[{$\sim$ControlWater}]{\setlength{\rightskip}{0pt plus 5cm}ControlWater::$\sim$ControlWater (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{class_control_water_a873503afdb91122677c4a348879d1482}
The destructor. 

\subsection{Member Function Documentation}
\hypertarget{class_control_water_a91f31497a1c48ca790bed1c6071f83bc}{
\index{ControlWater@{ControlWater}!exportData@{exportData}}
\index{exportData@{exportData}!ControlWater@{ControlWater}}
\subsubsection[{exportData}]{\setlength{\rightskip}{0pt plus 5cm}void ControlWater::exportData (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{class_control_water_a91f31497a1c48ca790bed1c6071f83bc}
Saves data to the files that represent a scenario. \hypertarget{class_control_water_ac1951612172accb707328ce3c7341c7e}{
\index{ControlWater@{ControlWater}!findSolutions@{findSolutions}}
\index{findSolutions@{findSolutions}!ControlWater@{ControlWater}}
\subsubsection[{findSolutions}]{\setlength{\rightskip}{0pt plus 5cm}void ControlWater::findSolutions (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{class_control_water_ac1951612172accb707328ce3c7341c7e}
Options that involve the use of algorythms to process and present data. \hypertarget{class_control_water_a5479085fd696bdec9cc4fb144acb72a2}{
\index{ControlWater@{ControlWater}!importData@{importData}}
\index{importData@{importData}!ControlWater@{ControlWater}}
\subsubsection[{importData}]{\setlength{\rightskip}{0pt plus 5cm}void ControlWater::importData (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{class_control_water_a5479085fd696bdec9cc4fb144acb72a2}
Loads data from the files that represent a scenario. Asks for a directory, sends the string to loadData, if it's not a directory true will be returned. If the user enter a empty string (just press ENTER) it returns to the main menu. \hypertarget{class_control_water_afabb40821e1d527380559479b59b72bf}{
\index{ControlWater@{ControlWater}!manageData@{manageData}}
\index{manageData@{manageData}!ControlWater@{ControlWater}}
\subsubsection[{manageData}]{\setlength{\rightskip}{0pt plus 5cm}void ControlWater::manageData (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{class_control_water_afabb40821e1d527380559479b59b72bf}
Data management options \hypertarget{class_control_water_af168010e1d95d349169744ea4a8e021e}{
\index{ControlWater@{ControlWater}!manageNetwork@{manageNetwork}}
\index{manageNetwork@{manageNetwork}!ControlWater@{ControlWater}}
\subsubsection[{manageNetwork}]{\setlength{\rightskip}{0pt plus 5cm}void ControlWater::manageNetwork (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{class_control_water_af168010e1d95d349169744ea4a8e021e}
Options to manage the water network. \hypertarget{class_control_water_a0cb3fda8adde7e6019351391be3c1a00}{
\index{ControlWater@{ControlWater}!maxFlowDinic2nodes@{maxFlowDinic2nodes}}
\index{maxFlowDinic2nodes@{maxFlowDinic2nodes}!ControlWater@{ControlWater}}
\subsubsection[{maxFlowDinic2nodes}]{\setlength{\rightskip}{0pt plus 5cm}void ControlWater::maxFlowDinic2nodes (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{class_control_water_a0cb3fda8adde7e6019351391be3c1a00}
User select a origin and a destination and views the maximum flow path between the nodes. \hypertarget{class_control_water_ade1fe89adc69c3e830d00b27be65c9bb}{
\index{ControlWater@{ControlWater}!maxFlowFord2nodes@{maxFlowFord2nodes}}
\index{maxFlowFord2nodes@{maxFlowFord2nodes}!ControlWater@{ControlWater}}
\subsubsection[{maxFlowFord2nodes}]{\setlength{\rightskip}{0pt plus 5cm}void ControlWater::maxFlowFord2nodes (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{class_control_water_ade1fe89adc69c3e830d00b27be65c9bb}
User select a origin and a destination and views the maximum flow path between the nodes. \hypertarget{class_control_water_a4896e05db82838eab7a69a687d92fec7}{
\index{ControlWater@{ControlWater}!newInfrastructure@{newInfrastructure}}
\index{newInfrastructure@{newInfrastructure}!ControlWater@{ControlWater}}
\subsubsection[{newInfrastructure}]{\setlength{\rightskip}{0pt plus 5cm}void ControlWater::newInfrastructure (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{class_control_water_a4896e05db82838eab7a69a687d92fec7}
Select a \hyperlink{class_location}{Location} and create a \hyperlink{class_infrastructure}{Infrastructure} on that place. \hypertarget{class_control_water_ab2298a4d859a29914fda7147c3af4a69}{
\index{ControlWater@{ControlWater}!newJunction@{newJunction}}
\index{newJunction@{newJunction}!ControlWater@{ControlWater}}
\subsubsection[{newJunction}]{\setlength{\rightskip}{0pt plus 5cm}void ControlWater::newJunction (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{class_control_water_ab2298a4d859a29914fda7147c3af4a69}
Select a \hyperlink{class_location}{Location} and create a \hyperlink{class_junction}{Junction} on that place. \hypertarget{class_control_water_acb22dae8cb7c383a00bc576ede1db9bc}{
\index{ControlWater@{ControlWater}!newReservoir@{newReservoir}}
\index{newReservoir@{newReservoir}!ControlWater@{ControlWater}}
\subsubsection[{newReservoir}]{\setlength{\rightskip}{0pt plus 5cm}void ControlWater::newReservoir (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{class_control_water_acb22dae8cb7c383a00bc576ede1db9bc}
Select a \hyperlink{class_location}{Location} and create a \hyperlink{class_reservoir}{Reservoir} on that place. \hypertarget{class_control_water_a4ca574dd210b1c53775cc279662f6b8d}{
\index{ControlWater@{ControlWater}!removeInfrastructure@{removeInfrastructure}}
\index{removeInfrastructure@{removeInfrastructure}!ControlWater@{ControlWater}}
\subsubsection[{removeInfrastructure}]{\setlength{\rightskip}{0pt plus 5cm}void ControlWater::removeInfrastructure (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{class_control_water_a4ca574dd210b1c53775cc279662f6b8d}
Removes a \hyperlink{class_infrastructure}{Infrastructure} selected by the user. \hypertarget{class_control_water_a4d53631b73a61b25d241ebaf1185f0b0}{
\index{ControlWater@{ControlWater}!removeJunction@{removeJunction}}
\index{removeJunction@{removeJunction}!ControlWater@{ControlWater}}
\subsubsection[{removeJunction}]{\setlength{\rightskip}{0pt plus 5cm}void ControlWater::removeJunction (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{class_control_water_a4d53631b73a61b25d241ebaf1185f0b0}
Removes a \hyperlink{class_junction}{Junction} selected by the user. \hypertarget{class_control_water_a3167861d71755558e09ba27915576370}{
\index{ControlWater@{ControlWater}!removeReservoir@{removeReservoir}}
\index{removeReservoir@{removeReservoir}!ControlWater@{ControlWater}}
\subsubsection[{removeReservoir}]{\setlength{\rightskip}{0pt plus 5cm}void ControlWater::removeReservoir (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{class_control_water_a3167861d71755558e09ba27915576370}
Removes a \hyperlink{class_reservoir}{Reservoir} selected by the user. \hypertarget{class_control_water_a8c3e07d4a59d9abff9eb3f1570df9603}{
\index{ControlWater@{ControlWater}!showNetwork@{showNetwork}}
\index{showNetwork@{showNetwork}!ControlWater@{ControlWater}}
\subsubsection[{showNetwork}]{\setlength{\rightskip}{0pt plus 5cm}void ControlWater::showNetwork (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{class_control_water_a8c3e07d4a59d9abff9eb3f1570df9603}
Show water network on \hyperlink{class_graph_viewer}{GraphViewer} \hypertarget{class_control_water_a0f3df5a777946fd6271f8adb964a2b10}{
\index{ControlWater@{ControlWater}!showRoadNetwork@{showRoadNetwork}}
\index{showRoadNetwork@{showRoadNetwork}!ControlWater@{ControlWater}}
\subsubsection[{showRoadNetwork}]{\setlength{\rightskip}{0pt plus 5cm}void ControlWater::showRoadNetwork (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{class_control_water_a0f3df5a777946fd6271f8adb964a2b10}
Uses Graphviewer to see all inormation from the underlying road network. \hypertarget{class_control_water_ad633f5a3cda34dd7313bb131829fdbc8}{
\index{ControlWater@{ControlWater}!start@{start}}
\index{start@{start}!ControlWater@{ControlWater}}
\subsubsection[{start}]{\setlength{\rightskip}{0pt plus 5cm}void ControlWater::start (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{class_control_water_ad633f5a3cda34dd7313bb131829fdbc8}
The program start interacting with user here. \hypertarget{class_control_water_ad7c1a7ec2197305bd325b0ffd0119565}{
\index{ControlWater@{ControlWater}!wipeData@{wipeData}}
\index{wipeData@{wipeData}!ControlWater@{ControlWater}}
\subsubsection[{wipeData}]{\setlength{\rightskip}{0pt plus 5cm}void ControlWater::wipeData (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{class_control_water_ad7c1a7ec2197305bd325b0ffd0119565}
Clear all Data to load a new scenario. 

The documentation for this class was generated from the following files:\begin{DoxyCompactItemize}
\item 
C:/Users/Paulo/git/cal2012t4/water/src/\hyperlink{_control_water_8h}{ControlWater.h}\item 
C:/Users/Paulo/git/cal2012t4/water/src/\hyperlink{_control_water_8cpp}{ControlWater.cpp}\end{DoxyCompactItemize}
